home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 25
/
Cream of the Crop 25.iso
/
bbs
/
mhis020.zip
/
CALLSTAT.MEX
< prev
next >
Wrap
Text File
|
1996-12-21
|
955b
|
39 lines
#include <max.mh>
#include <input.mh>
#include "callavg.mh"
#include "callcrit.mh"
#include "callers.mh"
#include "callutil.mh"
int main () {
string: temp;
long: start, end;
struct _callstats: stats;
read_callers ();
if (call_open() = False) {
print ("Cannot open callers.dat!!\n");
};
print (COL_WHITE, "Starting call, date, or <enter> for first: ", COL_CYAN);
readstr (temp);
start := caller_index_forward (temp);
print (COL_WHITE, "Ending call, date, or <enter> for last: ", COL_CYAN);
readstr (temp);
end := caller_index_backward (temp);
stats_average (stats, start, end);
print (COL_WHITE + "Totals:\n");
stats_show (stats, 1);
if (stats.calls) {
print (COL_WHITE + "\n\nAverage per call:\n");
stats_show (stats, stats.calls);
print (COL_WHITE + "\n\nAverage per day:\n");
stats_show (stats, stats.days);
};
print ("\n");
call_close ();
}